package cn.kasa.controller;

import cn.kasa.User;
import cn.kasa.feign.UserFeignClient;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
@AllArgsConstructor
public class OrderController {
    private UserFeignClient userFeignClient;

    @GetMapping("/getUserById/{id}")
    public User getUserById(@PathVariable Long id){
        return userFeignClient.getUserById(id);
    }
}
